import fetch from 'utils/fetch';
// 获取菜单
export function getInfo(sRoleId) {
    const data = {
        roleId: sRoleId
    };
    return fetch({
        // url: 'http://test.report.juziwl.cn/analysis/user/getMenusByRoleId',
        url: '/user/getMenusByRoleId',
        method: 'post',
        data
    });
}


// 真登陆  boss登陆
export function loginByEmail(sAccount, sPassword) {
    const data = {
        account: sAccount,
        password: sPassword
    };
    return fetch({
        url: '/user/login',
        // url: 'http://test.report.juziwl.cn/analysis/user/login',
        method: 'post',
        data
    });
}
// 修改密码
export function updatePassword(oldPassword, password, confirmPassword) {
    const data = {
        oldPassword,
        password,
        confirmPassword
    };
    return fetch({
        url: '/user/updateAnalysisUserPassword',
        method: 'post',
        data
    });
}

// 原密码验证
export function validatePasswordLib(oldPassword) {
    const data = {
        oldPassword
    };
    
    return fetch({
        url: '/user/validatePassword',
        method: 'post',
        data
    });
}